<?php

require_once './include/common.inc.php';

getMyParam("act");
getMyParam("email");

$email_error = false;
$email_send = false;

if ($act == "send") {
    if (strstr($email, '@')) {
        $sql = "SELECT `username`, `password2`, `status` FROM `user` WHERE `email` LIKE '$email'";
        $this_user_info = $db->get_one($sql);
        if (!empty($this_user_info) && ($this_user_info['status'] == "1" || $this_user_info['status'] == "2")) {
            $username = $this_user_info['username'];
            $password = $this_user_info['password2'];            
            require_once './mail/forgot_password.php';
            sendmail($from_name,$from_email,$to_name,$to_email,$subject,$content);
            $email_send = true;
        } else {
            $email_error = true;
        }
    } else {
        $email_error = true;
    }
}


require_once PrintEot('header');
require_once PrintEot('login_reminder');
require_once PrintEot('footer');

?>